Package mitza.coreservice.security

Source Code of mitza.coreservice.security.BasicHttpAuthenticator

package mitza.coreservice.security;

import java.net.Authenticator;
import java.net.PasswordAuthentication;

/**
* @author Mihai Cadariu
*/
public class BasicHttpAuthenticator extends Authenticator {

  private String user;
  private String password;

  public BasicHttpAuthenticator(String user, String password) {
    this.user = user;
    this.password = password;
  }

  @Override
  protected PasswordAuthentication getPasswordAuthentication() {
    return new PasswordAuthentication(user, password.toCharArray());
  }
}
TOP

Related Classes of mitza.coreservice.security.BasicHttpAuthenticator

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.